package com.jumi.microservice.material.dto.warehouse;

import com.jumi.microservice.common.exception.ExceptionEnum;
import com.jumi.microservice.common.validator.annotation.Mobile;
import com.jumi.microservice.common.validator.group.UpdateGroup;
import com.jumi.microservice.common.base.AbstractObject;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 仓库请求参数类
 *
 * @author ssk
 * @create 2020/7/25 14:17
 **/
public class JmWarehouseRequest extends AbstractObject implements Serializable {


    private static final long serialVersionUID = 6825111766445750596L;
    /**
     * 仓库ID
     */
    @ApiModelProperty(hidden = true)
    @NotNull(groups = {UpdateGroup.class})
    private Long warehouseId;

    /**
     * 仓库名称
     */
    @ApiModelProperty(hidden = true)
    @NotNull
    private String warehouseName;

    /**
     * 联系人姓名
     */
    @ApiModelProperty(hidden = true)
    @NotNull
    private String linkName;

    /**
     * 联系人电话
     */
    @ApiModelProperty(hidden = true)
    @Mobile
    private String linkPhone;

    /**
     * 仓库所在省份ID
     */
    @ApiModelProperty(hidden = true)
    private Long provinceId;

    /**
     * 仓库所在省份名称
     */
    @ApiModelProperty(hidden = true)
    private String provinceName;

    /**
     * 仓库所在城市ID
     */
    @ApiModelProperty(hidden = true)
    private Long cityId;

    /**
     * 仓库所在城市名称
     */
    @ApiModelProperty(hidden = true)
    private String cityName;

    /**
     * 仓库所在地区ID
     */
    @ApiModelProperty(hidden = true)
    private Long areaId;

    /**
     * 仓库所在地区名称
     */
    @ApiModelProperty(hidden = true)
    private String areaName;

    /**
     * 仓库所在地详细地址
     */
    @ApiModelProperty(hidden = true)
    private String address;

    /**
     * 仓库状态;0=启用;1=禁用
     */
    @ApiModelProperty(hidden = true)
    private Integer status;

    /**
     * 查询开始时间
     */
    @ApiModelProperty(hidden = true)
    private String startTime;

    /**
     * 查询结束时间
     */
    @ApiModelProperty(hidden = true)
    private String endTime;


    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public String getLinkName() {
        return linkName;
    }

    public void setLinkName(String linkName) {
        this.linkName = linkName;
    }

    public String getLinkPhone() {
        return linkPhone;
    }

    public void setLinkPhone(String linkPhone) {
        this.linkPhone = linkPhone;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }


    @Override
    public <T> T clone(T target){
        try {
            return super.clone(target);
        } catch (Exception e) {
            throw ExceptionEnum.FAIL_CHANGE.newException();
        }
    }
}
